package com.mzkj.wanjulaile.mobile.api.modules.weChat.service;

import com.mzkj.wanjulaile.mobile.api.modules.weChat.entity.NotifyReturnData;
import com.mzkj.wanjulaile.mobile.api.modules.weChat.mapper.NotifyReturnMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Copyright © 2016 上海美挚网络. All rights reserved.
 *
 * @Projec: meilein
 * @Package:in.meile.print.modules.mobile.service
 * @Description:微信支付通知 服务类
 * @author:bing
 * @date:16/5/10 下午4:12
 * @version:V1.0
 */
@Service("notifyReturnService")
public class NotifyReturnService {
    @Autowired
    private NotifyReturnMapper notifyReturnDao;

    public NotifyReturnData getByOutTradeNo(String outTradeNo) {
        return notifyReturnDao.getByOutTradeNo(outTradeNo);
    }

    public NotifyReturnData get(Long id) {
        return notifyReturnDao.get(id);
    }

    @Transactional(readOnly = false)
    public NotifyReturnData insert(NotifyReturnData returnData) {
        notifyReturnDao.insert(returnData);
        return returnData;
    }
}
